﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
using System.Windows.Forms;

namespace DataAccessLayer
{
    public class DataAccessAbstract
    {
        public DataAccessAbstract()
        {

        }

        public OleDbConnection ConnectionData()
        {
            OleDbConnection cn;
            //duong dan den file CSDL
            String DBFilePath = Application.StartupPath + "\\QLKS.mdb";
            string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DBFilePath;
            //tao ket noi CSDL
            cn = new OleDbConnection(strConnection);
            //mo ket noi CSDL
            cn.Open();
            return cn;
        }
    }
}
